package cn.com.zal.cgweb.pojo;

import cn.com.zal.cgweb.common.utils.TcProductUtil;

/**
 * TcOrderDetail entity. @author MyEclipse Persistence Tools
 */

public class TcOrderDetail implements java.io.Serializable {

	// Fields

	private TcOrderDetailId id;
	private Long quantity;
	private Double price;
	
	// Constructors

	/** default constructor */
	public TcOrderDetail() {
	}

	/** full constructor */
	public TcOrderDetail(TcOrderDetailId id, Long quantity, Double price) {
		this.id = id;
		this.quantity = quantity;
		this.price = price;
	}

	// Property accessors

	public TcOrderDetailId getId() {
		return this.id;
	}

	public void setId(TcOrderDetailId id) {
		this.id = id;
	}

	public Long getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Long quantity) {
		this.quantity = quantity;
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	
	public TcProduct getTcProduct(){
		return TcProductUtil.aTcProductDAO.findById(this.id.getProductId());
	}

}